fix(gui): always hide the error label if we are allowed to rename
authorJyrki Gadinger <nilsding@nilsding.org>
Thu, 17 Apr 2025 16:05:28 +0000 (18:05 +0200)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Fri, 30 May 2025 07:39:56 +0000 (09:39 +0200)
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
src/gui/invalidfilenamedialog.cpp

index ed51d951843a505988f263aa262bd1260902c180..c2bd029e53709e601aa07963f136f2be7e92e609 100644 (file)
@@ -140,7 +140,6 @@ InvalidFilenameDialog::InvalidFilenameDialog(AccountPtr account,
 
     if (_fileLocation == FileLocation::NewLocalFile) {
         allowRenaming();
-        _ui->errorLabel->setText({});
     } else {
         checkIfAllowedToRename();
     }
@@ -223,6 +222,7 @@ void InvalidFilenameDialog::allowRenaming()
     _ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true);
     _ui->filenameLineEdit->setEnabled(true);
     _ui->filenameLineEdit->selectAll();
+    _ui->errorLabel->setText({});
 
     const auto filePathFileInfo = QFileInfo(_filePath);
     const auto fileName = filePathFileInfo.fileName();